package com.biz.primus.ms.member.dao.po;

import com.biz.primus.model.member.enums.InvoiceTypes;
import com.biz.primus.ms.base.jpa.po.BaseEntityPKIncrement;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

/**
 * 会员发票相关信息
 *
 * @author jun.liu
 * @date 2017年10月22日
 * @reviewer
 * @see
 */
@Entity
@Table(name = "member_invoice")
@Data
@EqualsAndHashCode(callSuper = true)
public class MemberInvoice extends BaseEntityPKIncrement
{

    /**
     * 发票抬头
     */
    @Column(name = "invoice_title", nullable = false, length = 100)
    private String invoiceTitle;

    /**
     * 纳税人识别号
     */
    @Column(name = "identifier_number", nullable = false, length = 64)
    private String identifierNumber;

    /**
     * 注册电话
     */
    @Column(name = "reg_phone", length = 11)
    private String regPhone;

    /**
     * 注册地址
     */
    @Column(name = "reg_address", length = 200)
    private String regAddress;

    /**
     * 开户银行
     */
    @Column(name = "back_name", length = 60)
    private String bankName;

    /**
     * 开户银行账号
     */
    @Column(name = "card_code", length = 32)
    private String cardCode;

    /**
     * 发票类型
     */
    @Enumerated(EnumType.STRING)
    private InvoiceTypes invoiceType = InvoiceTypes.personal;

    /**
     * 关联会员详情Member对象
     */
    @Column(name = "memberId")
    private Long memberId;

    /**
     * 默认
     */
    @Column
    private Boolean selectDefault = true;

}